import React from 'react'


export default class Child extends React.Component {

  // constructor(props) {
  //   super(props)
  // }


  componentWillMount() {
    console.log('will mount')
  }

  componentDidMount() {
    console.log('did mount');

  }

  componentWillReceiveProps(nextProps) {
    console.log('will props', nextProps)
  }


  shouldComponentUpdate(nextProps, nextState) {
    console.log('should update')
    return true
  }
  //WARNING! To be deprecated in React v17. Use componentDidUpdate instead.
  componentWillUpdate(nextProps, nextState) {
    console.log('will update')

  }

  componentDidUpdate() {
    console.log('did update')
  }




  render() {
    console.log(this.props)
    return (
    <div>
      <p>{this.props.name}1111</p>
    </div>
    )

  }
}